-
-
Notifications
You must be signed in to change notification settings - Fork 233
feat: add Pinia Colada plugin support #2505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add Pinia Colada plugin support #2505
Conversation
Add @pinia/colada plugin to openapi-ts with example implementation. - Add PiniaColadaPlugin type definitions and configuration - Register plugin in config system and plugin type map - Include example Vue application demonstrating Pinia Colada integration - Update pnpm-lock.yaml with new dependencies - Fix linting issues in generated code
|
🦋 Changeset detectedLatest commit: 97c57f6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@SebastiaanWouters is attempting to deploy a commit to the Hey API Team on Vercel. A member of the Team first needs to authorize it. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2505 +/- ##
==========================================
- Coverage 23.83% 23.81% -0.03%
==========================================
Files 357 359 +2
Lines 35416 35464 +48
Branches 1499 1500 +1
==========================================
+ Hits 8442 8444 +2
- Misses 26962 27008 +46
Partials 12 12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
commit: |
Hey @SebastiaanWouters, mind describing how similar/different this is from #1680? I'd be looking to merge both |
…plugin - Add autoDetectHttpMethod option (default: true) to automatically detect query vs mutation based on HTTP method - GET requests → query, POST/PUT/PATCH/DELETE → mutation - Add operationTypes option to override auto-detection for specific operations - Add groupByTag option to organize generated files by OpenAPI tags - Add exportFromIndex option to create index file when groupByTag is enabled - Maintain backward compatibility with existing configurations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Add extensive testing coverage including: **Unit Tests**: - HTTP method auto-detection logic (GET → query, POST/PUT/DELETE → mutation) - Operation type override functionality - groupByTag file organization logic - Configuration validation and defaults - Complex integration scenarios **Snapshot Tests**: - Default plugin configuration - Auto-detection disabled scenarios - Operation type overrides (getPetById: 'both', addPet: 'query') - groupByTag with and without index files - Custom naming patterns and case settings - Disabled options combinations - Complex configurations combining all features - Meta function configurations **Functional Tests**: - Generated code structure validation - Query/mutation options format verification - Runtime behavior testing with mock requests - AbortSignal integration testing - Tag-based file organization verification - Index file generation validation - Meta property inclusion verification **Integration Tests**: - Compatibility with different HTTP clients (fetch, axios) - Multi-plugin configurations - Custom SDK transformers compatibility - Different response styles (data vs response) - Class-based SDK integration - Various case settings between plugins - TypeScript/JavaScript enum compatibility - Plugin dependency validation - OpenAPI version compatibility (2.0.x, 3.0.x, 3.1.x) - Error handling for edge cases **Meta Function Tests**: - Query meta function configuration - Mutation meta function configuration - Combined meta functions with groupByTag - Custom meta properties with complex configurations This comprehensive test suite ensures robust functionality across all plugin features and configurations, following the established testing patterns from other plugins in the codebase. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Update example configuration to demonstrate new features: - Enable autoDetectHttpMethod with clear documentation - Show groupByTag configuration options - Demonstrate operationTypes overrides with examples - Add exportFromIndex option explanation - Include commented examples for common use cases This provides users with a clear reference for utilizing the new HTTP method auto-detection and groupByTag features. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add eslint-disable comments for unused _heyApiClient imports - Add eslint-disable comments for unused options parameters in mutation functions - Maintain original SDK configuration as requested - All lint checks now pass successfully
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SebastiaanWouters just making sure you saw my earlier comment!
…t/pinia-colada-plugin
I'll take it from here! You should still get the credit once it's merged 🤝 |
507e868
to
d2089b0
Compare
d2089b0
to
97c57f6
Compare
thanks for completing and accepting the pr @mrlubos. Feel free to let me know if you need further help with this / other plugins. |
Add @pinia/colada plugin to openapi-ts with example implementation.